In [1]:
text_all = """
Czibula, G., Cojocar, G.S., Czibula, I.G., Evaluation Measures For Partitioning Based Aspect Mining Techniques, International Journal Of Computers Communications & Control, Vol. 6 No. 1, 2011, pp.72 - 80.
Serban, G., Moldovan, G.S, A hierarchical clustering based approach in aspect mining, Computing And Informatics, Vol. 29, No. 6 , 2010, pp.881 - 900
Moldovan G.S., Tarta, A. M., Developing an Usability Evaluation Module using AOP, International Journal of Computers Communications & Control, 1, Suppl.S, 2006, pp. 320 - 325
Czibula, G., Guran A.M., Czibula I.G., Cojocar G.S., IPA - An Intelligent Personal Assistant Agent For Task Performance Support, in Proceedings of the IEEE 5th International Conference on Intelligent Computer Communication and Processing(ICCP) 2009, Cluj-Napoca, Romania, IEEE Computer Society, pp. 31-34 (ISI proceedings)
Czibula, G., Cojocar, G. S., Czibula I.G., A partitional clustering algorithm for crosscutting concerns identification, Proceedings of SEPADS 2009, Cambridge, UK, Wseas Press 978-960-474-052-9, , 2009, pp. 111-116 (ISI proceedings)
Czibula, G., Czibula I.G., Cojocar, G. S., Guran A.M., Assisting Software Maintenance and Evolution Using an Agent Based Approach, in Proceedings of Knowledge Engineering: Principles and Techniques(KEPT), Presa Univ. Clujeana, Editor: M. Frentiu, 2067-1180, 2009, pp. 197-204 (ISI proceedings)
Cojocar G. S., Cojocar Dan, A Comparison of AOP based Monitoring Tools, in Proceedings of International Conference Knowledge Engineering: Principles and Techniques (KEPT) 2011, STUDIA UNIV. Babes-Bolyai, Informatica, Vol. LVI, No. 3, 2011, pp.65-70
Czibula, G., Czibula I.G., Cojocar, G.S. , Guran A. M., Decision support system for software maintenance and evolution, in Proceedings of International Conference Knowledge Engineering: Principles and Techniques (KEPT) 2009, pp.181-184 (ISI proceedings)
Czibula, G., Czibula, G.I., Cojocar, G.S., Guran, A.M., IMASC - An Intelligent MultiAgent System for Clinical Decision Support, , in Proceedings of Complexity In Artificial And Natural Systems (CANS) 2008, Targu Mures, IEEE Society Press, 2008, pp. 183-188.
Cojocar, G.S.,Guran, A.M., Sanislav, T., Czibula, G., A multiagent based approach for national cancer registry management , in Proceedings of Sixth International Conference on Applied Mathematics (ICAM6), Baia-Mare, Romania, September 18-21, 2008 .
Cojocar, G.S., Czibula(Serban), G., On Clustering based Aspect Mining , in Proceedings of the 4th IEEE International Conference on Intelligent Computer Communication and Processing (ICCP), August, 28-30, 2008, Cluj-Napoca, Romania, pp. 129-136.
Czibula(Serban), G., Guran, A.M., Cojocar, G.S., Czibula, I.G., Multiagent Decision Support Systems based on Supervised Learning, in 2008 IEEE-TTTC International Conference on Automation, Quality and Testing, Robotics, AQTR 2008, pp.353-358 (ISI proceedings).
Serban, G., Cojocar, G.S. A New Hierarchical Agglomerative Clustering Algorithm in Aspect Mining, in Proceedings of the 3rd Balkan Conference in Informatics, 27-29 September 2007, Sofia, Bulgaria, pp. 143-152.
Tarta, A.M., Cojocar, G.S. An Agent Based Approach for Pandemic Spread Prediction , in Proceedings of the 3rd Balkan Conference in Informatics, 27-29 September 2007, Sofia, Bulgaria, pp. 433-440.
Cojocar, G.S., Serban, G., On Evaluating Aspect Mining Techniques , in Proceedings of the 3rd IEEE International Conference on Intelligent Computer Communication and Processing (ICCP), September, 6-8, 2007, Cluj-Napoca, Romania, pp. 217-224 (ISI proceedings).
Serban, G., Cojocar, G.S. A New Graph-Based Approach in Aspect Mining, in Proceedings of Knowledge Engineering: Principles and Techniques (KEPT), Cluj-Napoca, Romania, June, 6-8, 2007, 252-260.
Cojocar, G.S., Serban, G., On Some Criteria for Comparing Aspect Mining Techniques , in Proceedings of Linking Aspect Technology and Evolution (LATE) Workshop, co-located with AOSD'07, March, 12, Vancouver, Canada, 2007, ACM Digital Library.
Serban, G., Tarta, A., Moldovan, G.S. A Learning Interface Agent for User Behavior Prediction, HCI International 2007, China, LNCS 4552: HCI Intelligent Multimodal Interaction Environments by J. Jacko, ISBN 978-3-540-73108-5, pp. 508-517 (ISI proceedings).
Serban, G., Moldovan, G.S. A New Genetic Clustering Based Approach in Aspect Mining, in Proceedings of 8th WSEAS International Conference on Mathematical Methods and Computational Techniques in Electrical Engineering (MMACTEE '06), Bucharest, Romania, October 16-18, 2006, pp. 135-140.
Moldovan, G.S., Serban, G., A Formal Model for Clustering Based Aspect Mining , in Proceedings of 8th WSEAS International Conference on Mathematical Methods and Computational Techniques in Electrical Engineering (MMACTEE '06), Bucharest, Romania, October 16-18, 2006, pp. 70-75. Best Student Paper Award.
Serban, G., Moldovan, G.S. A new k-means based clustering algorithm in Aspect Mining, in Proceedings of 8th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing (SYNASC'06),Timisoara, Romania, September 26-29, 2006, pp. 69-74, IEEE Computer Society, ISBN 0-7695-2740-X (ISI proceedings).
Tarta, A.M., Moldovan, G.S., Serban, G., An Agent Based User Interface Evaluation Using Aspect Oriented Programming , in Proceedings of Fifth International Conference on Applied Mathematics (ICAM5), Baia-Mare, Romania, September 21-24, 2006 (abstract).
Moldovan, G.S., Tarta, A.M., A Comparison of Using AOP and Java Accessibility for Usability Evaluation , in CD Proceedings of 4th European Conference on Intelligent Systems and Technologies (ECIT), Iasi, Romania, September 21-23, 2006, ISBN (10): 973-730-246-X, ISBN (13): 978-973-730-246-5.
Moldovan, G.S., Serban, G., Quality Measures for Clustering Based Aspect Mining Techniques , in Proceedings of Towards Evaluation of Aspect Mining (TEAM) Workshop, ECOOP 2006, Nantes, France, pp. 13-16.
Tarta, A.M., Moldovan, G.S., Automatic Usability Evaluation using AOP , in Proccedings of IEEE-TTTC International Conference on Automation, Quality and Testing, Robotics AQTR 2006 (THETA 15), TOME II, pp 84-89, ISBN: 1-4222-0360-X, May, 25-28, 2006 Cluj-Napoca, Romania (ISI proceedings).
Moldovan, G.S., Serban, G., Aspect Mining using a Vector-Space Model Based Clustering Approach , in Proceedings of Linking Aspect Technology and Evolution (LATE) Workshop, co-located with AOSD'06, March, 20, Bonn, Germany, 2006, pp. 36-40.
Niculescu, V., Moldovan, G.S., Building an Object Oriented Computational Algebra System Based on Design Patterns, 7th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing (SYNASC'05),Timisoara, Romania, IEEE Computer Society Press, ISBN 0-7695-2453-2, pp 101-108, 2005. (ISI proceedings)
Moldovan, G.S., Tarta, A. Designing a Task Analysis Tool using JHotDraw and Design Patterns, In Proceedings of International Conference on Theory and Applications of Mathematics and Informatics (ICTAMI 2005), Part B, pp. 77-86, Alba Iulia, Romania, 2005.
Niculescu, V., Moldovan, G.S., OOLACA: An Object Oriented Library for Abstract and Computational Algebra, Companion to the 19th annual ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, Vancouver, Canada, 2004, pp. 160-161.
Czibula G., Cojocar G. S., Identifying Crosscutting Concerns Using Partitional Clustering, WSEAS TRANSACTIONS on COMPUTERS, 2009, pp.386-395
Czibula, I.G., Czibula, G., Cojocar G.S. , Hierarchical Clustering for Identifying Crosscutting Concerns in Object Oriented Software Systems , INFOCOMP Journal of Computer Science, Brazilia , 2009, pp.21-28
Cojocar(Moldovan), G.S., Serban, G., A Formal Model for Partitioning Based Aspect Mining, in INFOCOMP Journal of Computer Science, Brazilia, 2007, volume 6, number 3, pp. 19-26.
Moldovan, G.S., Serban, G., Clustering Based Aspect Mining Formalized, in WSEAS Transactions on Computers, Issue 2, Vol.6, February 2007, pp. 199-206
Serban, G., Moldovan, G.S. Aspect Mining using an Evolutionary Approach, in WSEAS Transactions on Computers, Issue 2, Vol.6, February 2007, pp. 298-305.
Cojocar, G.S., Aspect Mining. Past, Present, Future, Zilele Academice Clujene, Presa Universitara Clujeana, Editor: M. Frentiu, 2012, pp. 15-19
Cojocar, G.S., Guran A.M., Agent-Based Approach in Cancer Registry Management, Zilele Academice Clujene, Presa Universitare Clujeana, Editor: M. Frentiu, 2010, pp. 29-36
Guran A. M., Cojocar G.S., Neamtiu Luciana, O abordare centrata pe utilizator in dezvoltarea unui sistem inteligent pentru generarea Registrelor Nationale de cancer, Conferinta Nationala de Interactiune Om-Calculator, Matrix Rom, 2009, pp. 77-83
Cojocar, G.S., Czibula, G., FRAM - A Framework for Evaluating the Results of Aspect Mining Techniques , Proceedings of the National Conference "Zilele Academice Clujene", Cluj-Napoca, 2008, pp.13-20.
Moldovan, G.S., Serban, G., CAMIT - A Tool for Comparing Clustering Based Aspect Mining Techniques , Proceedings of the Symposium "Zilele Academice Clujene", Cluj-Napoca, 2006, pp.9-14.
Tarta, A., Moldovan, G.S., GTA Tool - A Task Analysis Tool, Proceedings of the Symposium "Colocviul Academic Clujean de Informatica", Cluj-Napoca, 2005, pp 69-74.
Moldovan, G. S., Aspect Oriented Programming: A Case Study, Proceedings of the Symposium "Zilele Academice Clujene", Cluj-Napoca, 2004, pp 3-8.
Moldovan, G.S., Building an Application Using EJB Design Patterns, Proceedings of the Symposium "Colocviul Academic Clujean de Informatica", Cluj Napoca, 2003, pp. 45-52.
Cojocar, G.S., Czibula G., A Comparative Analysis Of Clustering Algorithms In Aspect Mining, in STUDIA UNIV. BABES-BOLYAI, INFORMATICA , Volume LIV, No. 1, 2009, pp.75-84
Guran, A.M., Cojocar G.S., Abordari în evaluarea automata a utilizabilitatii. Studiu comparativ , Revista Romana de Interactiune Om-Calculator , Bucuresti , Ed. Matrix Rom 2008, pp.73-84
Tarta, A.M., Moldovan, G.S., Serban, G., An Agent Based User Interface Evaluation Using Aspect Oriented Programming , in Creative Mathematics and Informatics, North University of Baia Mare, Volume 16, 2007, pp. 151-158.
Moldovan, G.S. , Serban, G., A Study on Distance Metrics for Partitioning Based Aspect Mining, Studia Universitatis Babes-Bolyai, Informatica, Volume LI, Number 2, 2006, pp. 53-60.
Serban, G., Moldovan, G.S. A Graph Algorithm for Identification of Crosscutting Concerns, Studia Universitatis Babes-Bolyai, Informatica, Volume LI, Number 2, 2006, pp. 3-10.
Serban, G., Moldovan, G.S. A Comparison of Clustering Techniques in Aspect Mining, Studia Universitatis Babes-Bolyai, Informatica, Volume LI, Number 1, pp. 69-78, 2006.
Niculescu, V., Moldovan, G.S., Integrating Conversions into a Computational Algebraic System, Studia Universitatis Babes-Bolyai, Informatica, Volume L, Number 2, pp. 41-48, 2005.
Moldovan, G.S., Traitement automatique de la langue,Babes-Bolyai University, Seminar on Computer Science, Preprint Vol. 2001, pp. 75-82.
Cojocar G. S, Aspect Mining , Editura Casa Cartii de Stiinta, 2009, pp. 208
"""
In [64]:
class HelperMethods:
@staticmethod
def IsDate(text):
# print("text")
# print(text)
for c in text.lstrip():
if c not in "1234567890 ":
return False
return True
In [7]:
def GetPublicationData_Number(text):
title = text.split(',')[0].split('.')[1]
try:
date = [k.lstrip() for k in text.split(',') if HelperMethods.IsDate(k.lstrip())][0]
except:
date = ""
return title, "", date
In [8]:
import re
def GetCoAuthorData(text):
# print(text)
val = re.search('\"[a-zA-Z ]+\"', text)
title = val.group(0)
val = re.search('Authors: [a-zA-Z,-. ]+ (?=Pages)', text)
authors = val.group(0)
# print(authors)
return title, authors, ""
In [9]:
def GetPublicationData_A(text):
print(text)
print()
text = text.replace("M. ", "")
authors = text.split('.')[0]
print("authors: ", authors)
title = text.split('.')[1].lstrip(' \"')
print("title: ", title)
try:
val = re.search('(19|20)[0-9]{2}\.', text)
date = val.group(0).rstrip('.')
except:
date = ""
print()
return title, authors, date
In [77]:
def GetPubData_B(text):
title_v = re.findall("[a-zA-Z ]+[^,]", text)
match_len = []
for k in title_v:
match_len.append((len(k), k))
match_len.sort(reverse=True)
title = match_len[0][1]
affiliations = match_len[1][1]
#print(match_len)
try:
# print(text.split(','))
date = [k.lstrip() for k in text.split(',') if HelperMethods.IsDate(k.lstrip())][0]
except Exception as ex:
# print(ex)
date = ""
return title, affiliations, date
In [78]:
pubs = []
for e in text_all.split('\n')[1:-1]:
#print(e)
title, affiliations, date = GetPubData_B(e)
pubs.append((title, affiliations, date))
In [79]:
for pub in pubs:
print(pub)
In [80]:
print("Count: ", len(pubs))
In [81]:
import mariadb
import json
In [82]:
with open('../credentials.json', 'r') as crd_json_fd:
json_text = crd_json_fd.read()
json_obj = json.loads(json_text)
In [83]:
credentials = json_obj["Credentials"]
username = credentials["username"]
password = credentials["password"]
In [84]:
table_name = "publications_cache"
db_name = "ubbcluj"
In [85]:
print(table_name)
In [86]:
mariadb_connection = mariadb.connect(user=username, password=password, database=db_name)
mariadb_cursor = mariadb_connection.cursor()
In [95]:
ctr = 0
for paper in pubs:
title = ""
pub_date = ""
authors = ""
try:
pub_date = paper[2].lstrip()
pub_date = str(pub_date) + "-01-01"
if len(pub_date) != 10:
pub_date = ""
except:
pass
try:
title = paper[0].lstrip()
except:
pass
try:
affiliations = paper[1].lstrip()
except AttributeError:
pass
insert_string = "INSERT INTO {0} SET ".format(table_name)
insert_string += "Title=\'{0}\', ".format(title)
insert_string += "ProfessorId=\'{0}\', ".format(10)
if pub_date != "":
insert_string += "PublicationDate=\'{0}\', ".format(str(pub_date))
#insert_string += "Authors=\'{0}\', ".format(authors)
insert_string += "Affiliations=\'{0}\' ".format(affiliations)
print(insert_string)
ctr += 1
continue
# raise NotImplementedError ("win")
try:
mariadb_cursor.execute(insert_string)
except mariadb.ProgrammingError as pe:
print("Error")
raise pe
except mariadb.IntegrityError:
continue
print(ctr)
In [148]:
mariadb_connection.close()